static struct dg100_command *
dg100_findcmd(int id)
{
- int i;
+ unsigned int i;
/* linear search should be OK as long as dg100_numcommands is small */
for (i = 0; i < dg100_numcommands; i++) {
static gbint16 *
dynarray16_alloc(struct dynarray16 *a, unsigned n)
{
- unsigned i;
- int need;
+ unsigned int i;
+ unsigned int need;
const unsigned elements_per_chunk = 4096 / sizeof(a->data[0]);
i = a->count;
static void
dg100_debug(const char *hdr, int include_nl, size_t sz, unsigned char *buf)
{
- int i;
+ unsigned int i;
/* Only give byte dumps for higher debug levels */
if (global_opts.debug_level < 5) {
/* return value: number of bytes copied into buf, -1 on error */
static int
-dg100_recv(gbuint8 expected_id, void *buf, unsigned len)
+dg100_recv(gbuint8 expected_id, void *buf, unsigned int len)
{
int n;
struct dg100_command *cmdinfo;
gbuint8 *data;
- int copysize, trailing_bytes;
+ unsigned int copysize, trailing_bytes;
n = dg100_recv_frame(&cmdinfo, &data);
static void
dg100_getfiles()
{
- int i, filenum;
+ unsigned int i;
+ int filenum;
struct dynarray16 headers;
route_head *track;